<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="common/include :: header"></head>
<body class="gray-bg">
<div class="ibox float-e-margins">
    <div class="ibox-content">
        <form class="form-horizontal m-t" id="menuInfoForm">
            <div class="row">
                <div class="col-sm-6 b-r">
                    <input id="id" name="id" type="hidden" th:value="${menu.id}">

                    <div class="form-group" underline="true">
                        <label class="col-sm-3 control-label">名称</label>
                        <div class="col-sm-8">
                            <input id="name" name="name" class="form-control"
                                   type="text" th:value="${menu.name}">
                        </div>
                    </div>
                    <div class="hr-line-dashed"></div>

                    <div class="form-group" underline="true">
                        <label class="col-sm-3 control-label">菜单编码</label>
                        <div class="col-sm-8">
                            <input id="code" name="code" class="form-control"
                                   type="text" th:value="${menu.code}">
                        </div>
                    </div>
                    <div class="hr-line-dashed"></div>

                    <div class="form-group" underline="true">
                        <label class="col-sm-3 control-label">父级菜单</label>
                        <div class="col-sm-8">
                            <input id="parentcode" name="parentcode"  class="form-control" type="hidden" th:value="${menu.parentcode}">
                            <input id="pcodeName" name="pcodeName" class="form-control" type="text"
                                   style="cursor: pointer;" onclick="openParentCode()"
                                   readonly="readonly" placeholder="选择父级" th:value="${pcodeName}">
                        </div>
                    </div>
                    <div class="hr-line-dashed"></div>

                    <div class="form-group" underline="true">
                        <label class="col-sm-3 control-label">菜单标志</label>
                        <div class="col-sm-8">
                            <select class="form-control m-b" id="ismenu" name="ismenu" th:field="${menu.ismenu}" th:switch="${menu.ismenu.toString()}">
                                <option value="1" th:selected="selected">是</option>
                                <option value="0" th:selected="selected">不是</option>
                            </select>
                        </div>
                    </div>
                    <div class="hr-line-dashed"></div>

                    <div class="form-group">
                        <div class="col-sm-8 col-sm-offset-3">
                            <button type="submit" class="btn btn-primary" icon="fa-eraser">提交</button>
                            <button class="btn btn-danger"  icon="fa-eraser" onclick="fclose()">取消</button>
                        </div>
                    </div>
                </div>

                <div class="col-sm-6 b-r">
                    <div class="form-group" underline="true">
                        <label class="col-sm-3 control-label">URL</label>
                        <div class="col-sm-8">
                            <input id="url" name="url" class="form-control" type="text" th:value="${menu.url}">
                        </div>
                    </div>
                    <div class="hr-line-dashed"></div>

                    <div class="form-group">
                        <label class="col-sm-3 control-label">排序</label>
                        <div class="col-sm-8">
                            <input id="order" name="order" class="form-control" type="text" th:value="${menu.order}">
                        </div>
                    </div>
                    <div class="hr-line-dashed"></div>

                    <div class="form-group" underline="true">
                        <label class="col-sm-3 control-label">图标</label>
                        <div class="col-sm-8">
                            <input id="icon" name="icon" class="form-control" type="text" th:value="${menu.icon}">
                        </div>
                    </div>
                    <div class="hr-line-dashed"></div>

                </div>
            </div>
        </form>
    </div>
</div>

<div th:include="common/include::footer"></div>
<script type="text/javascript" th:src="@{/project/menu/menu_edit.js}"></script>
</body>
</html>
